package com.wangzhixuan.model.vo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.wangzhixuan.commons.constant.ApiCode;
import com.wangzhixuan.commons.scan.MyException;
import com.wangzhixuan.commons.utils.StringUtils;

public class BaseInfoVo implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8352550784349408649L;
	private Integer userId;
	private Integer jobId;
	private Date startTime;
	private Date endTime;
	private String placeLongitude;
	private String placeLatitude;
	private String placeName;
	
	private String responsibleArr;
//	private List<String> responsibleArrList;
	
//	public String getResponsibleString(){
//		String temStr = "";
//		for(Integer id : responsibleArr){
//			temStr = temStr + id +",";
//		}
//		return temStr;
//	}
	
	public void checekParam() throws MyException{
		if(this.userId==null){
			 throw new MyException(ApiCode.CODE_501, "请重新登录");
		}
		if(this.jobId==null){
			 throw new MyException(ApiCode.CODE_501, "请选择工作类别");
		}
		if (startTime==null) {
			throw new MyException(ApiCode.CODE_501, "请选择开始时间");
        }
		if (endTime==null) {
			throw new MyException(ApiCode.CODE_501, "请选择结束时间");
        }
		if (StringUtils.isBlank(placeLongitude)) {
			throw new MyException(ApiCode.CODE_501, "请选择定位");
        }
		if (StringUtils.isBlank(placeLatitude)) {
			throw new MyException(ApiCode.CODE_501, "请选择定位");
        }
		if (StringUtils.isBlank(placeName)) {
			throw new MyException(ApiCode.CODE_501, "请选择定位");
        }
		if (StringUtils.isBlank(responsibleArr)) {
			throw new MyException(ApiCode.CODE_501, "请选择负责人");
        }
	}

	public String getResponsibleArr() {
		return responsibleArr;
	}

	public void setResponsibleArr(String responsibleArr) {
		this.responsibleArr = responsibleArr;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getJobId() {
		return jobId;
	}

	public void setJobId(Integer jobId) {
		this.jobId = jobId;
	}

	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public String getPlaceLongitude() {
		return placeLongitude;
	}

	public void setPlaceLongitude(String placeLongitude) {
		this.placeLongitude = placeLongitude;
	}

	public String getPlaceLatitude() {
		return placeLatitude;
	}

	public void setPlaceLatitude(String placeLatitude) {
		this.placeLatitude = placeLatitude;
	}

	public String getPlaceName() {
		return placeName;
	}

	public void setPlaceName(String placeName) {
		this.placeName = placeName;
	}

//	public List<Integer> getResponsibleArr() {
//		return responsibleArr;
//	}
//
//	public void setResponsibleArr(List<Integer> responsibleArr) {
//		this.responsibleArr = responsibleArr;
//	}

}
